<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php
	if(isset($_GET['hoTen']))
	{
		$hoTen=	$_GET['hoTen'];
		$phong=$_GET['lstPhong'];
		$ngay=$_GET['lstNgay'];
		$kq="Ngày $ngay<br />Giáo sư $hoTen sẽ dạy tại phòng: $phong";
	}
?>
<form id="form1" name="form1" method="get" action="Bai1_3.php">
  <table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td nowrap="nowrap" bgcolor="#FF0033" style="text-align: center; font-weight: bold; color: #FFF; font-style: italic; font-size: 24px;">ĐĂNG KÝ
        PHÒNG DẠY</td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#FF0033" style="text-align: center">&nbsp;</td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#FF99FF" style="text-align: center">Phòng
        số: 
        <select name="lstPhong" id="lstPhong">
          <option value="A001">A001</option>
          <option value="A002">A002</option>
          <option value="B001">B001</option>
          <option value="C001">C001</option>
          <option value="C002">C002</option>
      </select></td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#FF99FF" style="text-align: center">Giáo sư
        giảng dạy: 
        <input name="hoTen" type="text" id="hoTen" value="<?php echo $_POST['hoTen'];?>" /></td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#FF99FF" style="text-align: center">Ngày/
        tháng/ năm: 
        <select name="lstNgay" id="lstNgay">
        <?php
			list($gio,$phut,$giay,$thang,$ngay,$nam)=split(":",date("h:i:s:m:d:Y"));
			
			for($i=0;$i<14;$i++)
			{
				$timestamp=mktime($gio,$phut,$giay,$thang,$ngay+$i,$nam);
				$date=date("d/m/Y",$timestamp);
				echo "<option value='$date'>$date</option>";
			}
		?>
        
      </select></td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#FF99FF" style="text-align: center"><input type="submit" name="button" id="button" value="Ghi nhận" /></td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#FF99FF" style="text-align: center"><?php echo  $kq;?>&nbsp;</td>
    </tr>
  </table>
</form>
</body>
</html>